<?php
$root = '/login/';
$sections = array(
            'Home' => $root,
            'About' => $root.'about/',
            'Shop' => $root.'shop/',
            'Blog' => $root.'blog/'
);
?>
    <div id="topnav">
      <ul>
<?php foreach($sections as $key => $value): ?>
        <li<?php echo ($section == $key ? ' class="active"' : ''); ?>>
          <a href="<?php echo $value?>"><?php echo $key; ?></a>
        </li>
<?php endforeach; ?>
      </ul>
    </div><!-- #topnav -->
